/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class ACHomeChargingStation {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '040040013';
    }

    get categoryName() {
        return '\u4ea4\u6d41\u5bb6\u7528\u5145\u7535\u6869';
    }

    getCurrentElectricity(params) {
        return command({
            method: 'getCurrentElectricity',
            methodId: 'pGegeeIK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentPower(params) {
        return command({
            method: 'getCurrentPower',
            methodId: 'pZwpBglM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentVoltage(params) {
        return command({
            method: 'getCurrentVoltage',
            methodId: 'p1RY46kl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getOnceEnergy(params) {
        return command({
            method: 'getOnceEnergy',
            methodId: 'pUjL70fn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'ppbbd4v9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWorkStatus(params) {
        return command({
            method: 'getWorkStatus',
            methodId: 'pDNVDQV5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'pes4SRcE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default ACHomeChargingStation;
